import http from '@/utils/Http'

export interface NodeImage{
    id: number,
    type: string,
    dockerImage: string,
    createTime: string
}

export const nodeImageList = (type: string | null | undefined) => {
    return http<Array<NodeImage>>({
        url: '/node/imageList',
        method: 'get',
        params: { type: type },
    })
}

export interface AddNodeImage{
    type: string,
    dockerImage: string
}

export const addImage = (data: AddNodeImage) => {
    return http({
        url: '/node/addImage',
        method: 'post',
        data: data
    })
}